
//setTool("Straight line")

macro "Make heartbeat Kymograph [F2]" {
	
	run("Dynamic Reslice", "rotate");
}


macro "Smoothed Plot [F3]" {
run("Smoothed Plot Profile", "window=4 pixelunits=true");
waitForUser("Adjust ROI location on Kymograph, Select Plot Window, Then Click OK");
Plot.showValues("Plot Values");
   x1 = Table.getColumn("X0");
   Y1 = Table.getColumn("Y1");
   xValues = x1;
   yValues = Y1;
        Plot.create("Smoothed Plot", "X", "Y", xValues, yValues);
        Plot.setLineWidth(1);
        Plot.show();
}

macro  "Find Peaks [F4]" {

	run("Find Peaks");
}


macro "Close All Windows [F5]" { 
      while (nImages>0) { 
          selectImage(nImages); 
          close(); 
      } 
} 
